Geometric Point Pattern Matching in the Knuth-Morris-Pratt Way

نویسنده

  • Esko Ukkonen
چکیده

Given finite sets P and T of points in the Euclidean space R, the point pattern matching problem studied in this paper is to find all translations f ∈ R such that P + f ⊆ T . A fast search algorithm with some variants is presented for point patterns P that have regular grid–like geometric shape. The algorithm is analogous to the Knuth–Morris–Pratt algorithm of string matching. The time requirement of the search is O(r|T |) where r is the grid dimension of P . Pattern P has grid dimension r = 1 if it consists of evenly spaced points on a line. In general, a pattern P is an r–dimensional grid if it has for some p ∈ P and e1, . . . , er ∈ R and positive integers m1, . . . , mr a representation P = {p+ i1e1 + · · ·+ irer |0 ≤ ij ≤ mj} where the ij ’s are integers. Both P and T are given to the search algorithm in the lexicographic order.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Programming by Expression Refinement: the KMP Algorithm

The exercise is to calculate a pattern-matching algorithm, and specifically the algorithm originally due to Knuth, Morris, and Pratt [0]. We begin, however, with a smaller problem, one that turns out to be both similar to, and a subproblem of, the larger problem. We prefer to start with this because it will give the reader a chance to become familiar in a simple setting with the style and notat...

متن کامل

Partial Evaluation of Pattern Matching in StringsCharles

This article describes how automatically specializing a fairly naive pattern matcher by partial evaluation leads to the Knuth, Morris & Pratt algorithm. Interestingly enough, no theorem proving is needed to achieve the partial evaluation, as was previously argued, and it is suucient to identify a static component in the computation to get the result { a deterministic nite automaton. This experi...

متن کامل

Complexity of Sequential Pattern Matching Algorithms

We formally define a class of sequential pattern matching algorithms that includes all variations of Morris-Pratt algorithm. For last twenty years it was known that complexity of such algorithms are bounded by a linear function of the text string length. Recenlly, substantial progress has been made in identifying lower bounds. However, it was not known whether really there exists asymptotically...

متن کامل

Efficient validation and construction of Knuth–Morris–Pratt arrays

Knuth-Morris-Pratt (KMP) arrays are known as the ”failure function” of the Knuth-Morris-Pratt string matching algorithm. We present an algorithm to check if an integer array is a KMP array. This gives a method for computing all the distinct KMP arrays.

متن کامل

More Speed and More Compression: Accelerating Pattern Matching by Text Compression

This paper addresses the problem of speeding up string matching by text compression, and presents a compressed pattern matching (CPM) algorithm which finds a pattern within a text given as a collage system 〈D,S〉 such that variable sequence S is encoded by byte-oriented Huffman coding. The compression ratio is high compared with existing CPM algorithms addressing the problem, and the search time...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. UCS

دوره 16  شماره 

صفحات  -

تاریخ انتشار 2010